#include "Thread.hpp"

int main()
{
    ThreadModule::Thread thread([](){
        while(true)
        {
            std::cout << "hello thread" << std::endl;
            sleep(1);
        }
    });

    thread.Start();
    std::cout << thread.Name() << " is running" << std::endl;
    sleep(6);

    thread.Stop();
    std::cout << "stop " << thread.Name() << std::endl;
    sleep(6);

    thread.Join();
    std::cout << "join " << thread.Name() << std::endl;
    return 0;
}